
import PlayerBeeStateAttack from "../EnityAnimation/PlayerBeeAnimator/PlayerBeeStateAttack";
import PlayerBeeStateIdle from "../EnityAnimation/PlayerBeeAnimator/PlayerBeeStateIdle";
import PlayerBeeStateRun from "../EnityAnimation/PlayerBeeAnimator/PlayerBeeStateRun";


export default class AnimatorTypeManager {

    private static _Instance: AnimatorTypeManager;
    private constructor() { }
    //公开的方法
    public static get Instance(): AnimatorTypeManager {
        if (!this._Instance) {
            this._Instance = new AnimatorTypeManager();
            this._Instance.InitType();
        }
        return this._Instance;
    }
    HoneyBeesAnimatorTypeMap: Map<string, any> = new Map<string, any>();

    private InitType() {
        //玩家
        this.HoneyBeesAnimatorTypeMap.set("PlayerBeeStateAttack", PlayerBeeStateAttack);
        this.HoneyBeesAnimatorTypeMap.set("PlayerBeeStateIdle", PlayerBeeStateIdle);
        this.HoneyBeesAnimatorTypeMap.set("PlayerBeeStateRun", PlayerBeeStateRun);



    }
    DoesTheTypeExist(TypeName: string): boolean {

        if (this.HoneyBeesAnimatorTypeMap.has(TypeName)) {

            return true;
        }
        return false;
    }
    GetTypeByName(TypeName: string): any {

        if (this.HoneyBeesAnimatorTypeMap.has(TypeName)) {

            return this.HoneyBeesAnimatorTypeMap.get(TypeName);
        }
        return null;
    }
}